//
//  Const.h
//  DDFish
//
//  Created by cc on 2017/8/21.
//  Copyright © 2017年 Burining. All rights reserved.
//

#ifndef Const_h
#define Const_h



//Rgb值转成UIColor

#define CC_iOS7Later [[UIDevice currentDevice].systemVersion floatValue] >= 7.0f
#define CC_iOS8Later [[UIDevice currentDevice].systemVersion.floatValue] >= 8.0f
#define CC_iOS9Later [[UIDevice currentDevice].systemVersion.floatValue] >= 9.0f
#define kSystemVersion [[UIDevice currentDevice].systemVersion floatValue]



#ifdef DEBUG
#define NSLog(format, ...) printf("\n[%s] %s [第%d行] %s\n", __TIME__, __FUNCTION__, __LINE__, [[NSString stringWithFormat:format, ## __VA_ARGS__] UTF8String]);
#else
#define NSLog(format, ...)
#endif



#define DefineWeakSelf  __weak __typeof(self) weakSelf = self

#define iPhoneX (ScreenHeight == 812)
#define iPhone6P (ScreenHeight == 736)
#define iPhone6 (ScreenHeight == 667)
#define iPhone5 (ScreenHeight == 568)

#define topHeight (iPhoneX ? 88 : 62)
#define bottomHeight (iPhoneX ? 83 : 49)

#define RGBA_COLOR(R, G, B, A) [UIColor colorWithRed:((R) / 255.0f) green:((G) / 255.0f) blue:((B) / 255.0f) alpha:A]

#define RGB_COLOR(R,G,B) [UIColor colorWithRed:((R) / 255.0f) green: ((G) / 255.0f) blue:((B) / 255.0f) alpha: 1.0f]
#define ScreenHeight             [UIScreen mainScreen].bounds.size.height

#define ScreenWidth              [UIScreen mainScreen].bounds.size.width

#define ViewBounds              [UIScreen mainScreen].bounds

#define AppWindow               [[UIApplication sharedApplication] keyWindow]
#define popViewController     [self.navigationController popViewControllerAnimated:true];

#define kUserDefault [NSUserDefaults standardUserDefaults]

// 主背景颜色 红色
#define NaviBarGroundColor [UIColor colorWithHexString:@"e1524b"]
// 主文字颜色 黑色
#define MainTitleColor [UIColor colorWithHexString:@"0c0c0c"]
// 副文字颜色 灰色
#define AssistantTitleColor [UIColor colorWithHexString:@"757575"]
// 提示文字颜色 浅灰色
#define AlertTitleColor [UIColor colorWithHexString:@"c2c2c2"]
// 提示框颜色  黄色
#define AlertInnerTitleColor [UIColor colorWithHexString:@"f8b500"]
// 背景 颜色浅浅灰色
#define MainBackGroudColor RGB_COLOR(243, 243, 243)


//#define URL_IP  @"http://101.200.192.215:8082/yljc/"

//#define URL_IP  @"http://192.168.31.116:8080/yljc/"

//#define URL_IP  @"http://192.168.31.114:8080/yljc/"

#define URL_IP @"http://yjzsapp.com/"

#define YLURL(Url) [NSString stringWithFormat:@"%@%@",URL_IP,Url]

#define NetworkError @"当前网络不可用, 请检测你的网络设置"

#define YLUserDefault [NSUserDefaults standardUserDefaults]


#define YLDelegate (AppDelegate*)[UIApplication sharedApplication].delegate

#endif /* Const_h */
